<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录注册</title>
    <link rel="stylesheet" href="./common.css">
    <style>
       * {
    margin: 0;
    padding: 0;
}

.auth {
    overflow: hidden;
    width: 320px;
    background: #ffe;
}

.auth .auth-title {
    display: flex;
    position: relative;
    border-bottom: 1px solid #eee;
    height: 40px;
}

.auth .auth-title label {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: color;
    height: 100%;
    cursor: pointer;
}

.auth .auth-title em {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50%;
    border-radius: 1px;
    height: 2px;
    background-color: #f66;
    transition: all 0.3s ease-in-out;
}

.auth .auth-form {
    display: flex;
    width: 200%;
    height: 250px;
    transition: all 0.3s ease-in-out;
}

.auth .auth-form form {
    flex: 1;
    padding: 40px;
}

.auth .auth-form div {
    display: flex;
    flex-direction: column-reverse;
}

.auth .auth-form div+div {
    margin-top: 10px;
}

#register-btn:checked~.auth-title label:nth-child(2) {
    color: #f66;
    font-weight: bold;
}

#register-btn:checked~.auth-title em {
    transform: translateX(160px);
}

#register-btn:checked~.auth-form {
    transform: translateX(-320px);
}

#login-btn:checked~.auth-title label:nth-child(1) {
    color: #f66;
    font-weight: bold;
}

#login-btn:checked~.auth-title em {
    transform: translateX(0);
}
 
    </style>
</head>

<body>
    <div class="bruce flex-ct-x" data-title="登录注册">
        <div class="auth">
            <input type="radio" id="login-btn" hidden name="auth" checked />
            <input type="radio" id="register-btn" hidden name="auth" />
            <div class="auth-title">
                <label for="login-btn">登录</label>
                <label for="register-btn">注册</label>
                <em></em>
            </div>
            <div class="auth-form">
                <form>
                    <div>
                        <input type="text" class="text1"     placeholder="请输入手机" required pattern="^1[3-9]\d{9}$">
                        <label>手机</label>
                    </div>
                    <div>
                        <input type="passsword"  class="text2" placeholder="请输入密码" required pattern="^[a-zA-Z0-9]{6,12}$">
                        <label>密码</label>
                    </div>
                    <button type="submit">登录</button>

                </form>
                <form>
                    <div>
                        <input type="text" placeholder="请输入手机" required pattern="^1[3-9]\d{9}$">
                        <label>手机</label>
                    </div>
                    <div>
                        <input type="passsword" placeholder="请输入密码" required pattern="^[a-zA-Z0-9]{6,12}$">
                        <label>密码</label>
                    </div>
                    <div>
                        <input type="passsword" placeholder="请再次输入密码" required pattern="^[a-zA-Z0-9]{6,12}$">
                        <label>重复密码</label>
                    </div>
                    <button type="submit">注册</button>
                </form>
            </div>
        </div>
    </div>
</body>

</html>